/*
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * OpenAPI spec version: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package software.amazon.spapi.models.replenishment.v2022_11_07;

import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;

/** The offer program configuration contains a set of program properties for an offer. */
@Schema(description = "The offer program configuration contains a set of program properties for an offer.")
public class OfferProgramConfiguration {
    @SerializedName("preferences")
    private OfferProgramConfigurationPreferences preferences = null;

    @SerializedName("promotions")
    private OfferProgramConfigurationPromotions promotions = null;

    @SerializedName("enrollmentMethod")
    private EnrollmentMethod enrollmentMethod = null;

    public OfferProgramConfiguration preferences(OfferProgramConfigurationPreferences preferences) {
        this.preferences = preferences;
        return this;
    }

    /**
     * Get preferences
     *
     * @return preferences
     */
    @Schema(description = "")
    public OfferProgramConfigurationPreferences getPreferences() {
        return preferences;
    }

    public void setPreferences(OfferProgramConfigurationPreferences preferences) {
        this.preferences = preferences;
    }

    public OfferProgramConfiguration promotions(OfferProgramConfigurationPromotions promotions) {
        this.promotions = promotions;
        return this;
    }

    /**
     * Get promotions
     *
     * @return promotions
     */
    @Schema(description = "")
    public OfferProgramConfigurationPromotions getPromotions() {
        return promotions;
    }

    public void setPromotions(OfferProgramConfigurationPromotions promotions) {
        this.promotions = promotions;
    }

    public OfferProgramConfiguration enrollmentMethod(EnrollmentMethod enrollmentMethod) {
        this.enrollmentMethod = enrollmentMethod;
        return this;
    }

    /**
     * Get enrollmentMethod
     *
     * @return enrollmentMethod
     */
    @Schema(description = "")
    public EnrollmentMethod getEnrollmentMethod() {
        return enrollmentMethod;
    }

    public void setEnrollmentMethod(EnrollmentMethod enrollmentMethod) {
        this.enrollmentMethod = enrollmentMethod;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OfferProgramConfiguration offerProgramConfiguration = (OfferProgramConfiguration) o;
        return Objects.equals(this.preferences, offerProgramConfiguration.preferences)
                && Objects.equals(this.promotions, offerProgramConfiguration.promotions)
                && Objects.equals(this.enrollmentMethod, offerProgramConfiguration.enrollmentMethod);
    }

    @Override
    public int hashCode() {
        return Objects.hash(preferences, promotions, enrollmentMethod);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class OfferProgramConfiguration {\n");

        sb.append("    preferences: ").append(toIndentedString(preferences)).append("\n");
        sb.append("    promotions: ").append(toIndentedString(promotions)).append("\n");
        sb.append("    enrollmentMethod: ")
                .append(toIndentedString(enrollmentMethod))
                .append("\n");
        sb.append("}");
        return sb.toString();
    }

    /** Convert the given object to string with each line indented by 4 spaces (except the first line). */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
